package when3meet.view;

import java.awt.Dimension;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import when3meet.controller.KickController;

import javax.swing.JButton;

public class KickUserButton extends JButton implements MouseListener {

	String text;

	public KickUserButton(String s) {
		addMouseListener(this);
		setText(s);
		Dimension d = new Dimension(140, 32);
		setPreferredSize(d);
		setMaximumSize(d);

		this.addActionListener(new KickController(this));

	}

	@Override
	public void mouseClicked(MouseEvent arg0) {
		// TODO Auto-generated method stub

	}

	@Override
	public void mousePressed(MouseEvent arg0) {
		// TODO Auto-generated method stub

	}

	@Override
	public void mouseReleased(MouseEvent arg0) {
		// TODO Auto-generated method stub

	}

	@Override
	public void mouseEntered(MouseEvent e) {

		String s = "Remove: " + this.getText();
		setText(s);

	}

	@Override
	public void mouseExited(MouseEvent e) {
		String s = this.getText();
		s = s.split(" ")[1];
		setText(s);
	}

}